﻿<?xml version="1.0" encoding="utf-8"?>
<Witd:WITD application="Work item type editor" version="1.0" xmlns:Witd="http://schemas.microsoft.com/VisualStudio/2008/workitemtracking/typedef">
  <WORKITEMTYPE name="Support Ticket">
    <DESCRIPTION>A generic ticket work item used to track support requests and changes.</DESCRIPTION>
    <FIELDS>
      <FIELD reportable="dimension" type="String" name="Title" refname="System.Title">
        <REQUIRED />
        <HELPTEXT>Short description of the task used to differentiate it in a list or report</HELPTEXT>
      </FIELD>
      <FIELD reportable="dimension" type="String" name="State" refname="System.State">
        <HELPTEXT>The workflow state of the task</HELPTEXT>
      </FIELD>
      <FIELD reportable="dimension" type="Integer" name="Rev" refname="System.Rev" />
      <FIELD reportable="dimension" type="String" name="Changed By" refname="System.ChangedBy">
        <VALIDUSER />
      </FIELD>
      <FIELD reportable="dimension" type="String" name="Issue" refname="Microsoft.VSTS.Common.Issue">
        <REQUIRED />
        <ALLOWEDVALUES>
          <LISTITEM value="Yes" />
          <LISTITEM value="No" />
        </ALLOWEDVALUES>
        <DEFAULT from="value" value="No" />
        <HELPTEXT>Used to highlight a task, e.g., to mark it as an issue</HELPTEXT>
      </FIELD>
      <FIELD reportable="dimension" type="DateTime" name="State Change Date" refname="Microsoft.VSTS.Common.StateChangeDate">
        <WHENCHANGED field="System.State">
          <SERVERDEFAULT from="clock" />
        </WHENCHANGED>
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD reportable="dimension" type="DateTime" name="Activated Date" refname="Microsoft.VSTS.Common.ActivatedDate">
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD reportable="dimension" type="String" name="Activated By" refname="Microsoft.VSTS.Common.ActivatedBy">
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD reportable="dimension" type="String" name="Reason" refname="System.Reason">
        <HELPTEXT>The reason why the task is in the current state</HELPTEXT>
      </FIELD>
      <FIELD reportable="dimension" type="String" name="Assigned To" refname="System.AssignedTo">
        <VALIDUSER />
      </FIELD>
      <FIELD reportable="dimension" type="String" name="Work Item Type" refname="System.WorkItemType" />
      <FIELD reportable="dimension" type="String" name="Closed By" refname="Microsoft.VSTS.Common.ClosedBy">
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD reportable="dimension" type="DateTime" name="Closed Date" refname="Microsoft.VSTS.Common.ClosedDate">
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD reportable="dimension" type="DateTime" name="Created Date" refname="System.CreatedDate" />
      <FIELD reportable="dimension" type="String" name="Created By" refname="System.CreatedBy" />
      <FIELD type="PlainText" name="Description" refname="System.Description" />
      <FIELD type="History" name="History" refname="System.History">
        <HELPTEXT>Discussion thread and other historical information</HELPTEXT>
      </FIELD>
      <FIELD type="Integer" name="Related Link Count" refname="System.RelatedLinkCount" />
      <FIELD reportable="dimension" type="TreePath" name="Iteration Path" refname="System.IterationPath">
        <HELPTEXT>The iteration of the product with which this task is associated</HELPTEXT>
      </FIELD>
      <FIELD type="Integer" name="Iteration ID" refname="System.IterationId" />
      <FIELD type="Integer" name="External Link Count" refname="System.ExternalLinkCount" />
      <FIELD reportable="dimension" type="String" name="Team Project" refname="System.TeamProject" />
      <FIELD type="Integer" name="HyperLink Count" refname="System.HyperLinkCount" />
      <FIELD type="Integer" name="Attached File Count" refname="System.AttachedFileCount" />
      <FIELD type="String" name="Node Name" refname="System.NodeName" />
      <FIELD reportable="dimension" type="TreePath" name="Area Path" refname="System.AreaPath">
        <HELPTEXT>The area of the product with which this task is associated</HELPTEXT>
      </FIELD>
      <FIELD type="DateTime" name="Revised Date" refname="System.RevisedDate" />
      <FIELD reportable="dimension" type="DateTime" name="Changed Date" refname="System.ChangedDate" />
      <FIELD reportable="dimension" type="Integer" name="ID" refname="System.Id" />
      <FIELD type="Integer" name="Area ID" refname="System.AreaId" />
      <FIELD type="String" name="Authorized As" refname="System.AuthorizedAs" />
      <FIELD reportable="dimension" type="Integer" name="Priority" refname="Microsoft.VSTS.Common.Priority">
        <ALLOWEDVALUES>
          <LISTITEM value="1" />
          <LISTITEM value="2" />
          <LISTITEM value="3" />
        </ALLOWEDVALUES>
        <DEFAULT from="value" value="1" />
        <HELPTEXT>Sets the priority of the Request work item.</HELPTEXT>
      </FIELD>
      <FIELD reportable="dimension" type="String" name="UniqueIdentifier" refname="MsdnMag.SupportTicket.UniqueIdentifier">
        <HELPTEXT>Stores a value that uniquely identifies the source of the data stored in the Request work item.</HELPTEXT>
      </FIELD>
      <FIELD reportable="dimension" type="String" name="RequesterName" refname="MsdnMag.SupportTicket.RequesterName">
        <HELPTEXT>The display name of the sender of the email containing the original request.</HELPTEXT>
      </FIELD>
      <FIELD reportable="dimension" type="String" name="ConversationIndex" refname="MsdnMag.SupportTicket.ConversationIndex">
        <HELPTEXT>The index of the first mail message in a threaded email conversation in Exchange.</HELPTEXT>
      </FIELD>
      <FIELD reportable="dimension" type="String" name="ConversationTopic" refname="MsdnMag.SupportTicket.ConversationTopic">
        <HELPTEXT>The mail message conversation topic for a thread email conversation in Exchange. This is typically the email's subject with mail prefixes removed (e.g. Re: and Fw:).</HELPTEXT>
      </FIELD>
      <FIELD type="String" name="LatestConversationIndex" refname="MsdnMag.SupportTicket.LatestConversationIndex">
        <HELPTEXT>The index of the current mail message in a threaded email conversation in Exchange.</HELPTEXT>
      </FIELD>
    </FIELDS>
    <WORKFLOW>
      <STATES>
        <STATE value="In Progress" />
        <STATE value="Done" />
        <STATE value="New" />
      </STATES>
      <TRANSITIONS>
        <TRANSITION from="" to="New">
          <REASONS>
            <DEFAULTREASON value="New" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
              <COPY from="currentuser" />
              <VALIDUSER />
              <REQUIRED />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
              <SERVERDEFAULT from="clock" />
            </FIELD>
            <FIELD refname="System.AssignedTo">
              <EMPTY />
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="In Progress" to="Done">
          <ACTIONS>
            <ACTION value="Microsoft.VSTS.Actions.Checkin" />
          </ACTIONS>
          <REASONS>
            <DEFAULTREASON value="Completed" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <SERVERDEFAULT from="clock" />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
              <COPY from="field" field="System.AssignedTo" />
              <VALIDUSER />
              <REQUIRED />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
              <READONLY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
              <READONLY />
            </FIELD>
            <FIELD refname="System.AssignedTo">
              <EMPTY />
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="Done" to="New">
          <REASONS>
            <DEFAULTREASON value="Reactivated" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
              <COPY from="currentuser" />
              <VALIDUSER />
              <REQUIRED />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
              <SERVERDEFAULT from="clock" />
            </FIELD>
            <FIELD refname="System.AssignedTo">
              <COPY from="field" field="Microsoft.VSTS.Common.ClosedBy" />
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="New" to="In Progress">
          <REASONS>
            <DEFAULTREASON value="Work Has Started" />
          </REASONS>
          <FIELDS>
            <FIELD refname="System.AssignedTo">
              <REQUIRED />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <EMPTY />
            </FIELD>
          </FIELDS>
        </TRANSITION>
      </TRANSITIONS>
    </WORKFLOW>
    <FORM>
      <Layout>
        <Group>
          <Column PercentWidth="80">
            <Control FieldName="System.Title" Type="FieldControl" Label="&amp;Title:" LabelPosition="Left" />
          </Column>
          <Column PercentWidth="20">
            <Control FieldName="Microsoft.VSTS.Common.Priority" Type="FieldControl" Label="&amp;Priority:" LabelPosition="Left" />
          </Column>
        </Group>
        <Group Label="Status">
          <Column PercentWidth="40">
            <Control FieldName="System.AssignedTo" Type="FieldControl" Label="Assi&amp;gned to:" LabelPosition="Left" />
          </Column>
          <Column PercentWidth="30">
            <Control FieldName="System.State" Type="FieldControl" Label="&amp;State:" LabelPosition="Left" />
          </Column>
        </Group>
        <TabGroup>
          <Tab Label="Details">
            <Group>
              <Column PercentWidth="50">
                <Control FieldName="System.Description" Type="HtmlFieldControl" Label="Des&amp;cription:" LabelPosition="Top" Dock="Fill" />
              </Column>
              <Column PercentWidth="50">
                <Control FieldName="System.History" Type="WorkItemLogControl" Label="&amp;History:" LabelPosition="Top" Dock="Fill" />
              </Column>
            </Group>
          </Tab>
          <Tab Label="Links">
            <Control Type="LinksControl" LabelPosition="Top">
              <LinksControlOptions>
                <LinkColumns>
                  <LinkColumn RefName="System.Id" />
                  <LinkColumn RefName="System.Title" />
                  <LinkColumn RefName="System.AssignedTo" />
                  <LinkColumn RefName="System.State" />
                  <LinkColumn LinkAttribute="System.Links.Comment" />
                </LinkColumns>
                <WorkItemLinkFilters FilterType="include">
                  <Filter LinkType="System.LinkTypes.Related" />
                </WorkItemLinkFilters>
                <ExternalLinkFilters FilterType="include">
                  <Filter LinkType="Workitem Hyperlink" />
                </ExternalLinkFilters>
                <WorkItemTypeFilters FilterType="include">
                  <Filter WorkItemType="Bug" />
                  <Filter WorkItemType="Change Request" />
                </WorkItemTypeFilters>
              </LinksControlOptions>
            </Control>
          </Tab>
          <Tab Label="File Attachments">
            <Control Type="AttachmentsControl" LabelPosition="Top" />
          </Tab>
        </TabGroup>
      </Layout>
    </FORM>
  </WORKITEMTYPE>
</Witd:WITD>